//Library Book Class
#ifndef BOOK_T_H
#define BOOK_T_H

#include "Book.h"
#include <list>
#include <string>
using namespace std;

typedef string ISBN;
class Borrower_t;
class Person;

class Book_t{
	friend std::ostream& operator<<(std::ostream& os, const Book_t& book);
public:
	Book_t(Book& b, ISBN isbn, unsigned int copies = 0);
	Book_t(const Book_t& b);
	~Book_t();
	Book_t& operator=(const Book_t& b);

	bool available() const;
	bool borrow(Borrower_t *borrower);
	bool bringBack(Borrower_t *borrower);
	const std::string& getISBN() const;
	const Person* getAuthor() const;
	const std::string& getTitle() const;
	bool isBorrowed() const;
private:
	Book book;
	ISBN isbn;
	unsigned int copies;
	list<const Borrower_t *> borrowers;
	list<const Borrower_t *> waiting;
};


#endif
